// 获取小程序应用实例
const app = getApp();
Page({
  data: {
    avatarUrl: app.avatarUrl,
    nickname: app.nickname,
    msg: app.msg,
  },
  changeGlobalMsg() {
    app.changeMsg("我是老六");
    this.setData({
      msg: app.msg,
    });
  },
  onShow() {
    // 查看当前页面所在的页面栈
    const pageStack = getCurrentPages();
    console.log(pageStack);
  },
});
